package com.gecco;

import com.geccocrawler.gecco.annotation.Gecco;
import com.geccocrawler.gecco.annotation.Href;
import com.geccocrawler.gecco.annotation.HtmlField;
import com.geccocrawler.gecco.annotation.Request;
import com.geccocrawler.gecco.request.HttpRequest;
import com.geccocrawler.gecco.spider.HtmlBean;

import java.util.List;

@Gecco(matchUrl="https://doutushe.com/portal/index/index/p/{page}", pipelines="doutusheIndex")
public class DoutuSheIndex implements HtmlBean {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    @Request
    private HttpRequest request;

    @Href(click=true)
    @HtmlField(cssPath="a.link-2")
    private List<String> nameList;   //得到的是地址

    public HttpRequest getRequest() {
        return request;
    }

    public void setRequest(HttpRequest request) {
        this.request = request;
    }

    @Href(value="href")
    @HtmlField(cssPath="a.link-2")
    private List<String>idList;     //得到的名称


    @HtmlField(cssPath="ul.pagination li")
    private List<IndexPageEntity> pageList;
    public List<IndexPageEntity> getPageList() {
        return pageList;
    }

    public void setPageList(List<IndexPageEntity> pageList) {
        this.pageList = pageList;
    }

    public List<String> getNameList() {
        return nameList;
    }

    public List<String> getIdList() {
        return idList;
    }

    public void setNameList(List<String> nameList) {
        this.nameList = nameList;
    }

    public void setIdList(List<String> idList) {
        this.idList = idList;
    }


}
